﻿using DomainModel;
using Repository.Abstract;

namespace Repository.NHibernate
{
    public class GroupRepository : Repository<Group>, IGroupRepository
    {
        public Group GetByName(string groupName)
        {
            using (Session)
            {
                return Session.QueryOver<Group>().Where(g => g.GroupName == groupName).SingleOrDefault();
            }
        }
    }
}